{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 21,
   "id": "c9704bfc",
   "metadata": {},
   "outputs": [],
   "source": [
    "def findzn(x):\n",
    "    result=[]\n",
    "    for i in range(1,x):\n",
    "        isPrime=True\n",
    "        for q in range(2,i):\n",
    "            if i%q==0 and i!=2:\n",
    "                isPrime=False\n",
    "        if isPrime==True:\n",
    "            result.append(i)\n",
    "    return result"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "id": "292005de",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[1, 2, 3, 5, 7]"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "findzn(10)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
